@extends('admin.layouts.index')
@section('contents')
 <div class="mws-panel grid_8">
    <div class="mws-panel-header">
        <span><i class="icon-table"></i> 文章列表</span>
    </div>
    <div class="mws-panel-body no-padding">
        <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper" role="grid">
          <table aria-describedby="DataTables_Table_1_info" id="DataTables_Table_1" class="mws-datatable-fn mws-table dataTable">
            <thead>
                <tr role="row"><th aria-label="Rendering engine: activate to sort column descending" aria-sort="ascending" style="width: 186px;" colspan="1" rowspan="1" aria-controls="DataTables_Table_1" tabindex="0" role="columnheader" class="sorting_asc">ID</th>
                    <th aria-label="Browser: activate to sort column ascending" style="width: 251px;" colspan="1" rowspan="1" aria-controls="DataTables_Table_1" tabindex="0" role="columnheader" class="sorting">分类名称</th>
                    <th aria-label="Platform(s): activate to sort column ascending" style="width: 234px;" colspan="1" rowspan="1" aria-controls="DataTables_Table_1" tabindex="0" role="columnheader" class="sorting">所属父级分类</th>
                    <th aria-label="CSS grade: activate to sort column ascending" style="width: 118px;" colspan="1" rowspan="1" aria-controls="DataTables_Table_1" tabindex="0" role="columnheader" class="sorting">操作</th>
                </tr>
            </thead>
            @foreach($data as $k=>$res)
                <tbody aria-relevant="all" aria-live="polite" role="alert">
                        @if($k%2==0)
                        <tr class="odd">
                        @else
                        <tr class="even">
                        @endif
                            <td class="  sorting_1">{{$res['id']}}</td>
                            <td class=" ">{{$res['name']}}</td>
                            <td class=" ">{{App\Http\Controllers\admin\catecontroller::tran($res['pid'])}}</td>
                            <td class=" ">
                                <a href="/cate/{{$res['id']}}" class='icon-plus' style='font-size:15px;color:green;'></a>&nbsp;&nbsp;&nbsp;
                                <a href="/cate/{{$res['id']}}/edit" class='icon-tools' style='font-size:15px;color:green;'></a>&nbsp;&nbsp;&nbsp;
                                <a href="/cate_del/{{$res['id']}}" class='icon-trash' style='font-size:15px;color:red;'></a>
                            </td>
                        </tr>
                </tbody>
            @endforeach
        </table>
       
        <div id="pages" class="dataTables_paginate paging_full_numbers">

              
        </div>
      </div>
    </div>
</div>

@endsection